<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <img src="./bilibili/1.avif" alt="">
    <script>
        // 获取页面元素
        const img = document.querySelector('img')
        // 生成N-M的随机整数
        // const mf = Math.floor(Math.random() * 9 + 1)
        // console.log(mf);
        // img.src = `./bilibili/${mf}.avif`

        // 数组
        const arr = ['1.avif', '2.avif', '3.avif', '4.avif']
        
        // 随机下标
        let index = Math.floor(Math.random() * arr.length)


        // 1秒后刷新网页
        // setTimeout(function () {
        //     // 刷新网页
        //     window.location.reload()
        // }, 1000)


    </script>
</body>

</html>